import random


#  数值
a = 1
b = 1.2
print(type(a), type(b))
print(oct(23))  # 转换为8进制
print(bin(23))  # 二进制
print(hex(23))  # 十六进制
c = 23.423
print(type(c))
print(int(c))
print(float(c))

a4 = 3.5
print(round(a4))
a5 = 4.5
print(round(a5))  # 整数位是偶数四舍六入  整数位是奇数四舍五入 保留小数点后一位

name = random.choice(["sdf", "sdfsdf", "weew"])  # 随机选取一个值
print(name)
bumber = random.randrange(1, 100, 3)  # 3是步长
print(bumber)
b2 = random.random()  # 0-1随机实数
print(b2)


n = [1, 2, 3, 4, 5]
random.shuffle(n)  # 直接在元素上修改
